﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MisCategorias.aspx.cs" Inherits="GasteirosWeb.MisCategorias" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="gvCategorias" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="odsCategorias" 
        ForeColor="#333333" GridLines="None" Width="100%" DataKeyNames="IdCategoria">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="IdCategoria" HeaderText="IdCategoria" SortExpression="IdCategoria" ReadOnly="true" />
            <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" />
            <asp:BoundField DataField="IdCategoriaPadre" HeaderText="IdCategoriaPadre" SortExpression="IdCategoriaPadre" />
        </Columns>
        <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#E3EAEB" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:GridView>
    <asp:ObjectDataSource ID="odsCategorias" runat="server" 
        DataObjectTypeName="BLLGasteiros.DAL.GS_Categoria" 
        DeleteMethod="EliminarCategoria" InsertMethod="CargarCategoria" 
        SelectMethod="TraerCategorias" TypeName="BLLGasteiros.BLL.BLLCategoria" 
        UpdateMethod="EditarCategoria"></asp:ObjectDataSource>
    <br />
    <br />
    <span>Nombre:</span>
    <asp:TextBox ID="txtNombre" runat="server"></asp:TextBox>
    <asp:Button ID="btnCargarNuevo" runat="server" Text="Cargar Nueva" onclick="btnCargarNuevo_Click" />
    <asp:Label ID="lblResultado" runat="server" Text="" />
</asp:Content>
